1 <?php
2     $rdata = array_map(
'to_utf8', array_map('nl2br', array_map('html_attr_tags_ok', $rdata)));
3     $jdata = array_map(
'to_utf8', array_map('nl2br', array_map('html_attr_tags_ok', $jdata)));
4 ?>
5 <script>
6     $j(function(){
7         
var tn = 'departments';
8
9         
/* data for selected record, or defaults if none is selected */
10         
var data = {
11             school: <?php echo json_encode(array(
'id' => $rdata['school'], 'value' => $rdata['school'], 'text' => $jdata['school'])); ?>
12         };
13
14         
/* initialize or continue using AppGini.cache for the current table */
15         AppGini.cache = AppGini.cache || {};
16         AppGini.cache[tn] = AppGini.cache[tn] || AppGini.ajaxCache();
17         
var cache = AppGini.cache[tn];
18
19         
/* saved value for school */
20         cache.addCheck(function(u, d){
21             
if(u != 'ajax_combo.php') return false;
22             
if(d.t == tn && d.f == 'school' && d.id == data.school.id)
23                 
return { results: [ data.school ], more: false, elapsed: 0.01 };
24             
return false;
25         });
26
27         cache.start();
28     });
29 </script>



Hệ thống xếp lịch học tín chỉ cho sinh viên CNTT trên PHP & MySQL 112.154 lượt xem

Gõ tìm kiếm nhanh...